import request from '@/utils/request'

// 手机号查询兑换积分
export function getPointByPhone(query) {
  return request({
    url: '/supermarket/exchange/user',
    method: 'get',
    params: query
  })
}
// 根据商品条码获取商品信息
export function getProductByBarcode(query) {
  return request({
    url: '/supermarket/exchange/supermarketProduct',
    method: 'get',
    params: query
  })
}
// 提交现场兑换
export function submitExchange(data) {
  return request({
    url: '/supermarket/exchange/exchange',
    method: 'post',
    data: data
  })
}
// 查询近十天兑换记录
export function listExchange(query) {
  return request({
    url: '/supermarket/exchange/allExchange',
    method: 'get',
    params: query
  })
}
